/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.bean;

import com.openbravo.bean.shard.UserOrderTypePermission;
import com.openbravo.bean.shard.UserPermission;
import com.openbravo.bean.infobean.UserInfo;
import com.openbravo.pos.bean.I_AppUser;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_ModifiedLogBean;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Administrator
 */
public  class AppUser implements I_AppUser,I_AutoGeneratorStringKey, I_ModifiedLogBean<String> {

    /**
	 * 
	 */
	private static final long serialVersionUID = -6091189354170968587L;
	
	private String m_sId;
    private String m_sName;
    private String m_sCard;
    private String m_sPassword;
    private String m_sRole;
    private String m_sNumber;
    private Date lastModified;
    private boolean isVisable;
    private String m_sIMSI;

    private List<UserPermission> m_apermissions;
    private Map<String,UserOrderTypePermission> orderTypePermissions;
    private Map<String,UserOrderTypePermission> stateProcessPermissions;

    public String getCard() {
        return m_sCard;
    }

    public String getId() {
        return m_sId;
    }

    public String getKey() {
        return this.m_sId;
    }

    public Date getLastModified() {
        return lastModified;
    }

    public List<UserPermission> getM_apermissions() {
        return m_apermissions;
    }

    public String getName() {
        return m_sName;
    }

    public String getNumber() {
        return m_sNumber;
    }

    public Map<String, UserOrderTypePermission> getOrderTypePermissions() {
        return orderTypePermissions;
    }

    public String getPassword() {
        return m_sPassword;
    }

    public String getRole() {
        return m_sRole;
    }

    public UserInfo getUserInfo() {
        return new UserInfo(m_sId, m_sName);
    }

    public void setKey(String key) {
        this.m_sId = key;
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    }

    public void setM_apermissions(List<UserPermission> m_apermissions) {
        this.m_apermissions = m_apermissions;
    }

    public void setM_sCard(String m_sCard) {
        this.m_sCard = m_sCard;
    }

    public void setM_sId(String m_sId) {
        this.m_sId = m_sId;
    }

    public void setM_sName(String m_sName) {
        this.m_sName = m_sName;
    }

    public void setM_sNumber(String m_sNumber) {
        this.m_sNumber = m_sNumber;
    }

    public void setM_sPassword(String m_sPassword) {
        this.m_sPassword = m_sPassword;
    }

    public void setM_sRole(String m_sRole) {
        this.m_sRole = m_sRole;
    }

    public void setOrderTypePermissions(Map<String, UserOrderTypePermission> orderTypePermissions) {
        this.orderTypePermissions = orderTypePermissions;
    }

    public void setPassword(String sValue) {
        m_sPassword = sValue;
    }

    public boolean isVisable() {
        return isVisable;
    }

    public void setIsVisable(boolean isVisable) {
        this.isVisable = isVisable;
    }

	public void setUserStateProcessPermissions(
			Map<String, UserOrderTypePermission> fillOrderTypePermissions) {
		stateProcessPermissions=fillOrderTypePermissions;
	}

	public Map<String, UserOrderTypePermission> getUserStateProcessPermissions() {
		return stateProcessPermissions;
	}

	public String getM_sIMSI() {
		return m_sIMSI;
	}

	public void setM_sIMSI(String m_sIMSI) {
		this.m_sIMSI = m_sIMSI;
	}
	
}
